<template>
	<view class="container">
		<uni-forms ref="form" :rules="{}">
			<uni-forms-item label="用户名" name="">
				<uni-easyinput  v-model="user.username" @change="usernameChange"  placeholder="用户名" />
			</uni-forms-item>
			<uni-forms-item label="密码" name="">
				<uni-easyinput type="password"   v-model="user.password" placeholder="请输入密码" />
			</uni-forms-item>
			<uni-forms-item label="手机号" name="">
				<uni-easyinput v-model="user.telephone" placeholder="请输入手机号" />
			</uni-forms-item>
			<uni-forms-item label="" name="">
				<button type="primary" @click="register">注册</button>
			</uni-forms-item>
		</uni-forms>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user:{
					username:'',
					password:'',
					repassword:'',
					telephone:''
				}
			}
		},
		methods: {
			usernameChange(e){
				console.log(e);
			},
			
			register(e){
				uni.showToast({
					title: ''+this.user.username+'\r'+'注册成功',
					icon: 'none'
				});
			}
		},
		onLoad: () => {
			uni.onTabBarMidButtonTap(function(e){
				console.log(e)
				
			})
		}
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
